<ui:composition template="/template/twocolumn2.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

<ui:define name="conteudo">
      <div id="form_style">
            <h3>Consulta turma</h3>
    <h:form>
     <p:messages id="messages" showDetail="false"  globalOnly="true" autoUpdate="true" closable="true" />  
          <h:panelGrid id="pgcadastro" columns="3">
                <h:outputLabel id="lNome" value="#{Message['label.global.nome']}:" />
                <h:inputText id="nome" value="#{turmaMB.turma.nome}" />
                <h:message for="nome" errorStyle="color:red"/>
                               
                <h:outputLabel id="lSemestre" value="#{Message['label.turma.semestre']}:" />
                <h:inputText id="semestre" value="#{turmaMB.turma.semestre}" />
                <h:message for="semestre" errorStyle="color:red"/>
                
                <h:outputLabel id="lStatus" value="#{Message['label.usuario.status']}:" />
                 <h:selectOneMenu style="width:100%" id="status" value="#{turmaMB.statusTurma}">
                <f:selectItem itemLabel="-- Selecione --" noSelectionOption="true"/>
                <f:selectItems value="#{turmaMB.statusItens}" var="status"
                itemLabel="#{status.valor}" itemValue="#{status.chave}" />
                </h:selectOneMenu>  
                <h:message for="status" errorStyle="color:red"/>
                
           </h:panelGrid>     
           <h:panelGrid id="pick" columns="2">
                  <h:outputLabel id="lDisciplina" value="#{Message['label.global.disciplina']}:" />
                  <p:spacer />
                    <p:pickList id="pickList" value="#{turmaMB.disciplinasPickList}" var="disciplina"   
                     itemLabel="#{disciplina.nome}" itemValue="#{disciplina}" converter="#{disciplinaConverter}"/>  
                  <p:spacer />
                  
              <h:outputLabel id="lAluno" value="#{Message['label.global.aluno']}:" />
                  <p:spacer />
                <p:pickList id="pickListAluno" value="#{turmaMB.alunosPickList}" var="aluno"   
                itemLabel="#{aluno.nome}" itemValue="#{aluno}" converter="#{alunoConverter}"/> 
           </h:panelGrid>
                    <p:toolbar>  
                        <p:toolbarGroup align="left">  
                        <p:commandButton value="Alterar" action="#{turmaMB.alterarTurma}" ajax="false" icon="ui-icon-check" validateClient="true"  />
                        <p:commandButton value="Cancelar" action="#{turmaMB.voltarDaAlteracao}" immediate="true" ajax="false" icon="ui-icon-cancel"  />
                        <p:commandButton value="Limpar" type="reset" ajax="false" icon="ui-icon-clear"  />
                        </p:toolbarGroup>
                    </p:toolbar>
    </h:form>
    </div>
</ui:define>

</ui:composition>